{extend name="public:common_index"/}
{block name="main"}
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title"><i class="fa fa-list"></i> 举报列表</h3>
        </div>
        <div class="panel-body">
            <div class="panel-body">
                <div class="navbar navbar-default">
                    <form action="" id="search-form2" class="navbar-form form-inline" method="get" onsubmit="return false">
                        <div class="form-group">

                            <label class="control-label" for="input-order-id">状态</label>
                            <select class="form-control" name="status">
                                <option id="status2" value="">全部</option>
                                <option id="status1" value="1">举报成功</option>
                                <option id="status0" value="0">未处理</option>
                                <option id="status3" value="2">驳回</option>
                            </select>

                        </div>

                        <button type="submit" onclick="javascript:document.getElementById('search-form2').submit();"
                                id="button-filter search-order" class="btn btn-primary"><i class="fa fa-search"></i> 筛选
                        </button>

                    </form>
                </div>
            <div id="ajax_return">
                <form method="post" enctype="multipart/form-data" target="_blank" id="form-order">
                    <div class="table-responsive">
                        <table class="table table-bordered table-hover">
                            <thead>
                            <tr>
                                <td>序号</td>
                                <td>举报人</td>

                                <td>举报类型</td>
                                <td>{switch name='$type'}
                                    {case value='1'}被举报房间{/case}
                                    {case value='2'}被举报用户{/case}
                                    {default /}默认情况
                                    {/switch}
                                </td>

                                <td>举报理由</td>
                                <td>创建时间</td>
                                <td>更新时间</td>
                                <td>状态</td>
                                <td>操作</td>
                            </tr>
                            </thead>
                            <tbody>
                            <!-- 列表循环开始 -->
                            {volist name="rows" id="row" key="key"}
                            <tr>
                                <td>{$key}</td>
                                <td>{$row.nick_name}</td>

                                <td>{switch name='$row.type'}
                                    {case value='1'}房间{/case}
                                    {case value='2'}角色{/case}
                                    {default /}默认情况
                                    {/switch}
                                </td>
                                <td>{$row.name}</td>
                                <td>{$row.reason}</td>
                                <td>{$row.create_time}</td>
                                <td>{$row.update_time}</td>
                                <td>{switch name='$row.status'}
                                    {case value="0"}未处理{/case}
                                    {case value="1"}举报成功{/case}
                                    {case value="2"}驳回{/case}
                                    {default /}默认情况
                                    {/switch}
                                </td>

                                <td>
                                    <a class="btn btn-primary " href="/report/report_edit/id/{$row.report_id}">编辑</a>
                                    <span class="btn btn-danger check_del" data-message="" data-url="/report/delete/id/{$row.report_id}">删除</span>
                                </td>
                            </tr>
                            {/volist}
                            <!-- 列表循环结束 -->
                            </tbody>
                        </table>
                    </div>
                </form>
            </div>
            <div id='pagerarea'>{$pageHTML}</div>
        </div>
    </div>
{/block}

{block name="js"}
<script>
    $(function () {
        var type   = "{$Think.get.type}";
        if(type != ''){
            $('#type'+type).attr('selected',true)
        }

        var status   = "{$Think.get.status}";
        if(status != ''){
            $('#status'+status).attr('selected',true)
        }
    })

</script>



{/block}



